<template>
  <div>
  <van-tabbar v-model="active" active-color="darkred" inactive-color="#666">
    <van-tabbar-item to="/film" icon="video-o">电影</van-tabbar-item>
    <van-tabbar-item to="/cinema" icon="shop-o">影院</van-tabbar-item>
    <van-tabbar-item to="/center" icon="contact">我的</van-tabbar-item>
  </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "TabBar",
  computed: {
    active: {
      get() {
        switch (this.$route.path) {
          case "/film":
            return 0;
          case "/cinema":
            return 1;
          case "/center":
            return 2;
          default:
            break;
        }
      },
      set() {}
    }
  }
};
</script>
<style scoped>

</style>
